package org.common.utils.rpc.entity;
import java.util.HashMap;
import java.util.Map;

/**
 * 元数据
 * @author zhouzhibing
 * @date 2025/11/15 19:17
 */
public class Metadata {

    /**
     * 接口类
     */
    private final Class<?> interfaceClass;
    /**
     * 方法名
     */
    private final String methodName;
    /**
     * 参数
     */
    private final Map<String, Object> args = new HashMap<>();

    public Metadata(Class<?> interfaceClass, String methodName) {
        this.interfaceClass = interfaceClass;
        this.methodName = methodName;
    }

    public Class<?> getInterfaceClass() {
        return interfaceClass;
    }

    public String getMethodName() {
        return methodName;
    }

    public Map<String, Object> getArgs() {
        return args;
    }

    @Override
    public String toString() {
        return "\"" + interfaceClass.getSimpleName() + "." + methodName + "\"";
    }
}
